package time;

import java.time.LocalTime;


/**
 * Created by chengxiaoqi1 on 2018/10/25.
 */
public class DayDuringMillons {

    public static void main(String[] args) {

        int incr = 0;

        final int secondOfNow = LocalTime.now().toSecondOfDay();
        final int secondOf2Hour = LocalTime.of(2, 0, 0).toSecondOfDay();
        final int secondOf8Hour = LocalTime.of(8, 0, 0).toSecondOfDay();
        final int secondOf18Hour = LocalTime.of(18, 0, 0).toSecondOfDay();

        if (secondOfNow < secondOf2Hour ) {
            incr = secondOfNow / 60;
        } else if (secondOfNow >= secondOf2Hour && secondOfNow <= secondOf8Hour) {
            incr = (secondOfNow - secondOf2Hour) / 90 + 120;
        } else if (secondOfNow >= secondOf8Hour && secondOfNow <= secondOf18Hour) {
            incr = (secondOfNow - secondOf8Hour) / 30 + 120 + 240;
        } else if (secondOfNow >= secondOf18Hour) {
            incr = (secondOfNow - secondOf18Hour) / 20 + 120 + 240 + 1200;
        }

        System.out.println(incr);

    }

}
